﻿using System.ComponentModel.Composition;
using Caliburn.Micro;
using SuperShell.Common.IoC.Attributes.FilesPane;
using SuperShell.Common.IoC.Attributes.MainScreen;
using SuperShell.Infrastructure.Panes;
using SuperShell.Infrastructure.Screens;

namespace CorePlugin.MainScreen.ViewModels
{
	[MainScreen(Name = "CorePlugin.MainScreen", Id = "75374B7D-D350-4493-A0B5-C41E891CE75E",
		Description = "Two panes main screen")]
	public class MainScreenViewModel : Screen, IMainScreen
	{
		[Import]
		public ExportFactory<IFilesPane, IFilesPaneMetadata> FilesPaneFactory { get; set; }

		public IFilesPane LeftPane { get; set; }
		public IFilesPane RightPane { get; set; }

		protected override void OnActivate()
		{
			LeftPane = FilesPaneFactory.CreateExport().Value;
			RightPane = FilesPaneFactory.CreateExport().Value;
		}
	}
}
